package org.samith.web.ws.service;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import javax.jws.WebService;

import org.samith.entity.ServiceType;
import org.samith.entity.Transaction;

@WebService(endpointInterface = "org.samith.web.ws.service.ITransactionWS", 
		serviceName = "WSMobile")
public class TransactionWSServlet implements ITransactionWS {

	@Override
	public Transaction getTransactionById(int tranactionId) {
		Transaction trn = new Transaction();
		return trn;
	}

	@Override
	public List<Transaction> getTransactionsOfUser(int userId, Date fromDate,
			Date toDate) {
		ArrayList<Transaction> list = new ArrayList<Transaction>();
		Transaction trn1 = new Transaction();
		Transaction trn2 = new Transaction();
		trn1.setServiceId(new ServiceType());
		trn1.setTransactionCreatedAt(Calendar.getInstance().getTime());
		list.add(trn1);list.add(trn2);
		return list;
	}

}